<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fmt" uri="http://www.springframework.org/tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>专家评分</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=10,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="/lib/layui/layui/css/layui.css"/>
    <script type="text/javascript" src="/js/news/jquery-1.9.1.js"></script>
    <script src="/js/base/base.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/jquery/jquery.cookie.js"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.ui.widget.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.iframe-transport.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.fileupload.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="/js/common/fileupload.js"></script>
    <script type="text/javascript" src="/lib/layui/layui/layui.js"></script>
    <script type="text/javascript" src="/lib/layui/layui/layui.all.js"></script>
</head>
<style>
    .mbox {
        padding: 8px
    }

    .item img {
        height: 40px;
    }

    .btn {
        height: 30px;
    }

    .information {
        background: #e8f4fc;
        height: 30px;
        line-height: 30px;
    }
    .layui-form-label{
        width: 77px;
    }
    .openFile input[type=file]{
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 18px;
        z-index: 99;
        opacity: 0;
    }
    .layui-btn-xs {
        height: 29px;
        line-height: 28px;
        font-size: 13px;
    }
    .layui-input, .layui-textarea {
        width: 96%;
        margin-left: 20px;
    }
    .layui-table {
        width: 96%;
        margin-left: 20px;
    }

    .main {
        position: absolute;
        left: 50%;
        margin-left: -400px;
        margin-top: 15px;
        border: 1px solid #ccc;
        width: 800px;
        height: 320px
    }
    .layui-form layui-border-box layui-table-view{
        width: 96%;
        margin-left: 20px;
    }
</style>
<body>
<div class="mbox">
    <div class="item">
        <img src="../img/yeji.png" alt="" style="margin: 0 5px 0 20px;"> <span style="font-size: 22px;display: inline-block;vertical-align: middle;">专家评分</span>
    </div>
    <hr class="layui-bg-blue">
    <div>
        <div class="layui-form">
            <input type="radio" name="createType" value="1"  lay-filter="createType"  title="申报" checked>
            <input type="radio" name="createType" value="2"  lay-filter="createType" title="结题">
            <input type="radio" name="createType" value="4"  lay-filter="createType" title="单项评分">
        </div>
<%--        <button type="button" class="layui-btn layui-btn-sm sheng" style="background: #2b7fe0;width: 50px;">申报</button>--%>
<%--        <button type="button" class="layui-btn layui-btn-sm" style="background: #2b7fe0;width: 50px;">结题</button>--%>
<%--        <button type="button" class="layui-btn layui-btn-sm" style="background: #2b7fe0">单项评分</button>--%>
        <div class="btn" style="margin-top: -25px;">
            <button type="button" class="layui-btn layui-btn-sm" style="background: #2b7fe0;float: right;"><i
                    class="layui-icon layui-icon-upload-drag" style="background: #2b7fe0"></i>导出Excel
            </button>
        </div>
    </div>
    <%--    <table class="layui-hide" id="test" lay-filter="test"></table>--%>
    <div>
        <table class="layui-hide content" lay-filter="test" id="content"></table>
    </div>
</div>
</body>
</html>
<script type="text/html" id="barDemo">
    <div class="layui-btn-container">
        <a class="layui-btn layui-btn-xs declare" lay-event="intoGrade">进入评分</a>
    </div>
</script>
<script>

    var arr = [];
    var table;
    var rpmTopicList = [];
    var rpmPlan = {};

    //判断返回是否为空
    function empty(esName) {
        if(esName != undefined){
            return esName;
        }
        return '';
    }
    //转义字符反转义为标签符
    function html_decode(str)
    {
        var s = "";
        if (str.length == 0) return "";
        s = str.replace(/&amp;/g, "&");
        s = s.replace(/&lt;/g, "<");
        s = s.replace(/&gt;/g, ">");
        s = s.replace(/&nbsp;/g, " ");
        s = s.replace(/&#39;/g, "\'");
        s = s.replace(/&quot;/g, "\"");
        s = s.replace(/<br\/>/g, "\n");
        return s;
    }

    $(function() {
        layui.use(['table', 'layer', 'form', 'laydate', 'upload'], function () {
            table = layui.table
                , layer = layui.layer
                , form = layui.form
                , upload = layui.upload
                , laydate = layui.laydate
            $(document).ready(function () {
                form.render();
            });
            table.render({
                elem: '#content'
                , url: '/RpmResearchScore/findRpmResearchScore'
                , where: {
                    createType: '1'
                }
                // , toolbar: '#toolbarDemo' //开启头部工具栏，并为其绑定左侧模板
                , parseData: function (res) { //res 即为原始返回的数据
                    return {
                        "code": 0, //解析接口状态
                        "data": res.object, //解析数据列表，
                        "count": res.totleNum, //解析数据长度
                    };
                }
                , defaultToolbar: ['']
                , cols: [[
                    {type: 'checkbox'},
                    {type: 'numbers', title: '序号', align: 'center'}
                    , {
                        field: 'planName', title: '申报计划名称', align: 'center', templet: function (d) {
                            if (d.rpmPlanWithBLOBs != undefined) {
                                return d.rpmPlanWithBLOBs.planName;
                            } else {
                                return ''
                            }
                            // console.log(d[2].rpmPlanWithBLOBs.planName)
                        }
                    }
                    , {field: 'type', title: '操作', align: 'center', toolbar: '#barDemo'}
                ]],
                page: true,
            });

            //监听行工具事件
            table.on('tool(test)', function (obj) {
                var layEvent = obj.event;
                var tr = obj.tr;
                var data = obj.data;
                rpmPlan = data.rpmPlanWithBLOBs;
                rpmTopicList = data.topicList;
                if (layEvent === 'intoGrade') {
                    layer.open({
                        type: 1,
                        title: '<img src="../img/yeji.png" alt="" style="margin: 0 5px 0 -10px; height: 24px;">专家评分',
                        btn: ['返回'],
                        area: ['72%', '85%'],
                        content: '<div class="layui-form">\n' +
                            '   <div style="height: 40px;line-height: 40px;margin-bottom: 10px">\n' +
                            '       <button type="button" class="layui-btn layui-btn-sm import" style="float:right; background: #2b7fe0;margin-top:8px;margin-right: 26px;width:100px">批量导入</button>\n' +
                            '   </div>\n' +
                            '   <div style="height: 40px;line-height: 40px;background: #f2f2f2;margin-bottom: 10px">\n' +
                            '        <span style="font-size: 16px;margin-left: 20px;">评分标准</span>\n' +
                            '  <button type="button" class="layui-btn layui-btn-sm seeDetails" style="float: right;margin-right:25px;margin-top: 6px;width: 100px;">查看详情</button>\n'+
                            '   </div>\n' +
                            '        <div  name="scoreRule" id="scoreRule" class="layui-textarea scoreRule" disabled style="width: 96%; height: 100px;margin-left: 19px;overflow: hidden;resize:none;"></div>\n' +
                            '   <div style=" height: 35px; line-height: 35px;margin-top: 15px;margin-left: 20px;">\n' +
                            '       <button type="button" class="layui-btn layui-btn-sm confirmAll" onclick="sureAll()" >一键确认</button>\n' +
                            '   </div>\n' +
                            '   <table class="layui-table" id="demo1" border="1" lay-filter="demo1">\n' +
                            '                  <thead>' +
                            '                    <tr>\n' +
                            '                       <th lay-data="{field:\'topicName\'}">项目名称</th>\n' +
                            '                       <th lay-data="{field:\'researchName\'}">学科</th>\n' +
                            // '                       <th lay-data="{field:\'rpmResearchScore\'}">评分状态</th>\n' +
                            // '                       <th lay-data="{field:\'rsScore\'}">最高分</th>\n' +
                            '                       <th lay-data="{field:\'rsScore\',sort: \'true\'}">评分</th>\n' +
                            '                       <th lay-data="{field:\'remarks\'}">评分意见</th>\n' +
                            '                       <th lay-data="{field:\'operating\'}">操作</th>\n' +
                            '                    </tr>\n' +
                            '                </thead>' +
                            '        <tbody class="content">\n' +

                            '      </tbody>\n' +
                            '   </table>\n' +
                            '</div>\n'
                        , success: function (index, layero) {
                            //查看评分标准的详情
                            $('.seeDetails').click(function () {
                               var scoreRule =  $('#scoreRule').val()
                                layer.open({
                                    type: 1,
                                    title:'查看详情',
                                    btn: ['返回'],
                                    area: ['40%', '70%'],
                                    content: '<div class="cont1"  style="margin:10px;word-break: break-all;"></div>',
                                    success:function(){
                                        $('.cont1').html(scoreRule)
                                    },
                                    yes:function (index, layero) {
                                        layer.close(index);
                                    }
                                })
                            })
                           
                            //批量导入
                            $('.import').click(function () {
                                var index = layer.open({
                                    type: 1 //Page层类型
                                    , area: ['100%', '100%']
                                    , title: '批量导入'
                                    , content: '<div class="layui-form " id="ids">' +
                                        '<div class="main importTable">' +
                                        '   <div class="layui-input-block" style="margin-left:0px">\n' +
                                        '       <form class="form1" name="form1" id="uploadForm" method="post" action="" enctype="multipart/form-data">\n' +
                                        '<div class="layui-form-item" style="width: 800px;border-bottom:1px solid #ccc;margin-bottom:0px">\n' +
                                        '   <label style="padding: 15px 6px 15px 6px;width: 100px" class="layui-form-label">下载导入模板：</label>\n' +
                                        '   <div style="padding: 15px;" style="display: inline-block;width: 70%;">\n' +
                                        '     <a id="model" style="color: deepskyblue;cursor:pointer">专家评分导入模板</a>\n' +
                                        '   </div>\n' +
                                        '</div>\n' +
                                        '<div class="layui-form-item" style="width: 800px;border-bottom:1px solid #ccc;">\n' +
                                        '   <label style="padding: 15px 6px 15px 6px;width: 100px" class="layui-form-label">选择导入文件：</label>\n' +
                                        '   <div style="padding: 15px" style="display: inline-block;width: 70%;">\n' +
                                        '     <input style="width: auto" type="file" name="file" accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"/>\n' +
                                        '   </div>\n' +
                                        ' </div>\n' +
                                        ' <div style="width: 800px;border-bottom:1px solid #ccc;margin-bottom:0px">\n' +
                                        '   <label style="padding: 30px 6px 15px 6px;width: 100px" class="layui-form-label">说明：</label>\n' +
                                        '   <div style="display: inline-block;width: 70%">\n' +
                                        '                    <p>1.请导入.xls文件或者.xlsx。</p>\n' +
                                        '                    <p style="padding: 15px 0px 30px 0px">2.模版格式均为文本格式。</p>\n' +
                                        '   </div>\n' +
                                        ' </div>\n' +
                                        ' <div style="margin-left:360px;padding: 15px";width: 800px;border: 1px solid #ccc;">\n' +
                                        '      <input class="importBtn layui-btn layui-btn-normal" type="button" value="导入">\n' +
                                        ' </div>\n' +
                                        '   </form>\n' +
                                        '  </div>\n' +
                                        '</div>\n' +
                                        '</div>'
                                    // , btn: [ '返回']
                                    , success: function () {
                                        $('#model').click(function () {
                                            window.location.href = encodeURI("/file/rpm/专家评分导入模板.xls");
                                        });

                                        $('.importBtn').click(function () {
                                            var flag = CheckForm();
                                            if (flag) {
                                                layer.msg("<fmt:message code='down.th.2' />", {icon: 1});
                                                $.upload($('#uploadForm'), function (res) {
                                                    if (res.flag) {
                                                        layer.msg("成功导入" + res.totleNum + "条数据!", {icon: 1});
                                                        layer.closeAll();
                                                        tableInt.reload();
                                                    } else {
                                                        if (res.msg == undefined) {
                                                            res.msg = '导入失败！'
                                                        }
                                                        layer.msg(res.msg, {icon: 2});
                                                    }
                                                });
                                            }
                                        });

                                        function CheckForm() {
                                            if (document.form1.file.value == "") {
                                                layer.msg("<fmt:message code='user.th.selectImport' />！", {icon: 2});
                                                return (false);
                                            }

                                            return (true);
                                        }
                                    }
                                    , yes: function (index) {

                                    }
                                })

                            })
                            if (data.rpmPlanWithBLOBs != undefined) {
                                if (data.rpmPlanWithBLOBs.scoreRule != undefined) {
                                    var score = data.rpmPlanWithBLOBs.scoreRule;
                                    var htmldecode= html_decode(score);
                                    $('.scoreRule').html(htmldecode);
                                } else {
                                    $('.scoreRule').html('');
                                }
                            } else {
                                $('.scoreRule').html('');
                            }
                            //表格
                            var str = ''
                            if (rpmTopicList != undefined && rpmTopicList.length > 0) {
                                    for (var j = 0; j < rpmTopicList.length; j++) {
                                        var rpmscoreList = rpmTopicList[j].scoreList
                                        var rsId ='';
                                        if(rpmTopicList[j].rpmResearchScore!=undefined){
                                            rsId = rpmTopicList[j].rpmResearchScore.rsId;
                                        }
                                        str += '<tr class="score_tr" rsId='+rsId+' >' +
                                            '         <td class="topicId">' + empty(rpmTopicList[j].topicName) + '</td>\n' +
                                            '                <td>' + empty(data.researchName) + '</td>\n' +
                                            // '                <td>' + function () {
                                            //     if (rpmTopicList[j].rpmResearchScore != undefined) {
                                            //         return '已评分';
                                            //     }
                                            //     return '未评分';
                                            // }() + '</td>\n' +
                                            // '                <td>' + function () {
                                            //     if (rpmscoreList.length != 0) {
                                            //         for (var i = 0; i < rpmscoreList.length; i++) {
                                            //             if (rpmscoreList[i].rsScore != undefined) {
                                            //                 if (rpmscoreList.length > 1) {
                                            //                     var arr = []
                                            //                     for (var p = 0; p < rpmscoreList.length; p++) {
                                            //                         arr.push(rpmscoreList[p].rsScore)
                                            //                     }
                                            //                     arr = arr.sort()
                                            //                     return arr[arr.length - 1]
                                            //                     // return rpmTopicList[j].scoreList[i].rsScore< rpmTopicList[j].scoreList[i+1].rsScore ? rpmTopicList[j].scoreList[i+1].rsScore : rpmTopicList[j].scoreList[i].rsScore
                                            //                 } else {
                                            //                     return rpmscoreList[i].rsScore
                                            //                 }
                                            //             } else {
                                            //                 return ''
                                            //             }
                                            //         }
                                            //     } else {
                                            //         return ''
                                            //     }
                                            // }() + '</td>\n' +
                                            '                <td>' + function () {
                                                if (rpmscoreList.length != 0) {
                                                    for (var i = 0; i < rpmscoreList.length; i++) {
                                                        if (rpmscoreList[i].rsScore != undefined) {
                                                            return rpmscoreList[i].rsScore
                                                        } else {
                                                            return ''
                                                        }
                                                    }
                                                } else {
                                                    return ''
                                                }

                                            }() + '</td>\n' +
                                            '                <td>' + function () {
                                                if (rpmscoreList.length != 0) {
                                                    for (var i = 0; i < rpmscoreList.length; i++) {
                                                        if (rpmscoreList[i].remarks != undefined) {
                                                            return rpmscoreList[i].remarks
                                                        } else {
                                                            return ''
                                                        }
                                                    }
                                                } else {
                                                    return ''
                                                }
                                            }() + '</td>\n' +
                                            '                <td>\n' +
                                            '                    <button type="button" class="layui-btn layui-btn-sm"  lay-event="select" >查看</button>\n' +
                                            function(){
                                                if(rpmTopicList[j].rpmResearchScore==undefined||rpmTopicList[j].rpmResearchScore.confirmStatus!='1'){
                                                    //onclick="score(' + rpmTopicList[j].planId + ' , ' + rpmTopicList[j].topicId + ' , ' + rpmPlan.reviewFraction + ',this)"
                                                    //onclick="select(' + rpmTopicList[j].planId + ' , ' + rpmTopicList[j].topicId +', \'' + rpmTopicList[j].topicType + '\' , ' + rpmPlan.reviewFraction +',\'' + rpmTopicList[j].userId + '\')"
                                                    return  '<button type="button" class="layui-btn layui-btn-sm edit"  lay-event="score" >评分</button>\n' +
                                                        '<button type="button" class="layui-btn layui-btn-sm confirm" onclick="sure(this)">确认</button>\n';
                                                } else {
                                                    return '';
                                                }
                                            }()+
                                            '                </td>\n' +
                                            '            </tr>';
                                    }
                                } else {
                                    str = '<tr>\n' +
                                        '     <td colspan="5"  style="height:100px;text-align: center;">无数据</td>\n' +
                                        '</tr>';
                            }
                            $('.content').html(str)

                            table.init('demo1');
                        }
                    })
                }

            });

            //监听顶部单选按钮
            form.on('radio(createType)', function (data) {
                var value = data.value;
                //重载表格
                table.reload('content', {
                    where: {
                        createType: value
                    }
                });
            });
            //监听第二实例
            table.on('tool(demo1)',function(obj){
                var layEvent = obj.event;
                //当前行数据
                var topObj = rpmTopicList[$(obj.tr).attr('data-index')];
                var planId = topObj.planId;
                var topicId = topObj.topicId
                if(layEvent == 'score'){
                    layer.open({
                        type: 1,
                        title: '评分',
                        btn: ['确定', '取消'],
                        shade: 0.5,
                        maxmin: true, //开启最大化最小化按钮
                        area: ['30%', '50%'],
                        content:'<div style="margin: 10px;">\n' +
                            '    <form class="layui-form pingFen" action=""  style="display: block">\n' +
                            '        <div class="layui-form-item">\n' +
                            '            <label class="layui-form-label">分数</label>\n' +
                            '            <div class="layui-input-inline">\n' +
                            '                <input type="text"  name="title" id="rsScore" lay-verify="title" autocomplete="off" disabled  class="layui-input layui-form-label" style="text-align: left;width: 100%;">\n' +
                            '            </div>\n' +
                            '        </div>\n' +
                            '        <div class="layui-form-item">\n' +
                            '            <label class="layui-form-label">评审打分<span style="color: red">*</span></label>\n' +
                            '            <div class="layui-input-inline">\n' +
                            '                <input type="text" name="title" lay-verify="title" autocomplete="off"  class="layui-input Score">\n' +
                            '            </div>\n' +
                            '        </div>\n' +
                            '        <div class="layui-form-item">\n' +
                            '            <label class="layui-form-label">评审意见</label>\n' +
                            '            <div class="layui-input-inline">\n' +
                            '                    <textarea class="layui-textarea" id="remarks"></textarea>'+
                            '            </div>\n' +
                            '        </div>\n' +
                            '   </form>\n' +
                            '</div>'
                        ,success:function(res){
                            $.ajax({
                                type: 'get',
                                url: '/RpmResearchScore/findRsId',
                                dataType: 'json',
                                data:{
                                    planId:planId,
                                    topicId:topicId
                                },
                                success:function (res) {
                                    var data=res.object
                                    if (res.flag){
                                        $('#rsScore').val(rpmPlan.reviewFraction);
                                        $('.Score').val(data.rsScore);
                                        $('#remarks').val(data.remarks);
                                    }
                                }
                            })
                        },
                        yes:function (index) {
                            var score = $('.Score').val();
                            var remarks = $('#remarks').val();
                            if( score > rpmPlan.reviewFraction ){
                                layer.msg('评审打分  不能大于 分数！',{icon:2});
                            }else if( score == '' ){
                                layer.msg('评审打分！',{icon:2});
                            }else{
                                $.ajax({
                                    type: 'post',
                                    url: '/RpmResearchScore/editRpmResearchScore',
                                    dataType: 'json',
                                    data:{
                                        planId: planId ,
                                        topicId: topicId ,
                                        rsScore: score,
                                        reviewFraction:$('#rsScore').val(),
                                        remarks:remarks
                                    },
                                    success:function (res) {
                                        layer.close(index);
                                        //刷新表格
                                        obj.update({
                                            rsScore:score,
                                            remarks:remarks
                                        });
                                        // dom.parentNode.parentNode.setAttribute("rsId",res.object);
                                    }
                                });
                            }
                        }
                    });
                }else if(layEvent == 'select'){
                    if($('input:radio:checked').val() == "1"){
                        var userId = topObj.userId
                        var topicType = topObj.topicType
                        window.open('/rpmPlan/expertLook?planId=' + planId +'&userId='+userId +'&topicType='+topicType);
                    }else if($('input:radio:checked').val() == "2"){
                        console.log(topObj)
                        var trId;
                        var trType;
                        if(topObj.remarkList.length != 0){
                            for(var i=0; i<topObj.remarkList.length; i++){
                                if(topObj.remarkList[i].trType == '26'){
                                    trId = topObj.remarkList[i].trId
                                    trType = topObj.remarkList[i].trType
                                    layer.open({
                                        type: 2,
                                        title: '上传结题资料',
                                        btn: ['保存', '返回'],
                                        area: ['85%', '85%'],
                                        content: '/cnclusion/getClosingViewKt?trId=' + trId + '&type=' + 1 +'&trType='+trType,
                                    })
                                }
                            }
                        }
                    }else if($('input:radio:checked').val() == "4"){
                        layer.open({
                            type: 2,
                            title:'查看',
                            btn: ['返回'],
                            area: ['70%', '85%'],
                            content: '/Results/declaration?planId='+planId+'&type='+1 +'&topicId=' + topicId,
                            yes:function (index, layero) {
                                layer.close(index);
                            }
                        })
                    }
                }
            })

        })
    })
    //查看
    function select(planId , topicId,topicType,reviewFraction,userid,trId,trType) {

    }
    //确认
    function sure(dom){
        // console.log(dom)
        $.ajax({
            type: 'post',
            url: '/RpmResearchScore/allScoreConfirm',
            dataType: 'json',
            data:{
                rsIds: dom.parentNode.parentNode.getAttribute("rsId")
            },
            success:function (res) {
                if(res.flag){
                    layer.msg("确认成功", {icon: 1,time: 1000
                    }, function(){
                        table.reload('content', {
                            where: {
                                createType: $('input[name="createType"]:checked').val()
                            }
                        });
                        layer.close();
                    });
                } else {
                    layer.msg("确认失败", {icon: 2});
                }
            }
        });
    }
    //一键确认
    function sureAll(){
        var rsIds = '';
        $('.score_tr').each(function(){
            if($(this).attr('rsId')){
                rsIds += $(this).attr('rsId')+',';
            }
        })
        $.ajax({
            type: 'post',
            url: '/RpmResearchScore/allScoreConfirm',
            dataType: 'json',
            data:{
                rsIds: rsIds
            },
            success:function (res) {
                if(res.flag){
                    layer.msg("确认成功", {icon: 1,time: 1000
                    }, function(){
                        table.reload('content', {
                            where: {
                                createType: $('input[name="createType"]:checked').val()
                            }
                        });
                        layer.closeAll();
                    });
                } else {
                    layer.msg("确认失败", {icon: 2});
                }
            }
        });
    }

    function standard ( planId ){
        layer.open({
            type: 1,
            title: '评分标准',
            btn: ['确定'],
            shade: 0.5,
            maxmin: true, //开启最大化最小化按钮
            area: ['40%', '50%'],
            content:
                '<div class="fuText">\n'+
                '</div>'
            ,success:function(res){
                $('.fuText').html(arr[planId-1]);
            }
        })

    }


</script>
